<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <meta name="description" content="" />

    <title>苏大科协2020招新</title>
    <!-- Bootstrap core CSS -->
    <link
      href="assets/css/bootstrap.min.css"
      rel="stylesheet"
    />
    <link rel="shortcut icon" href="assets/images/favicon.ico">
    <script src="assets/js/jquery.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <link href="assets/css/style2.css" rel="stylesheet" />
  </head>
  <body class="text-center">
    <div class="container-fluid">
      <nav
        class="navbar navbar-expand-lg navbar-light p-3 bg-light d-flex border-bottom px-md-4 mb-3"
      >
        <a class="navbar-brand" href="#">
          <img
            src="assets/images/sdkx.png"
            width="30"
            height="30"
            class="d-inline-block align-top"
            alt=""
          />
          苏大科协2020
        </a>
        <button
          class="navbar-toggler"
          type="button"
          data-toggle="collapse"
          data-target="#navbarNavAltMarkup"
          aria-controls="navbarNavAltMarkup"
          aria-expanded="false"
          aria-label="Toggle navigation"
        >
          <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNavAltMarkup">
          <div class="navbar-nav">
            <a class="nav-item nav-link active" href="#"
              >面试教室 <span class="sr-only">(current)</span></a
            >
            <a class="nav-item nav-link" href="http://sdkx2019.mikecrm.com/AIfN4Cp"
              >线上报名</a
            >
            <a class="nav-item nav-link" href="#" data-toggle="modal" data-target="#exampleModalCenter">查看更多</a>
          </div>
        </div>
      </nav>

      <main role="main" class="inner cover">
        <h3 class="text-white">2020招新面试教室一览</h2>
        <div class="row">
          <div class="col-sm-5">
            <div class="card text-center">
              <div class="card-header">
                <ul
                  class="nav nav-pills nav-justified"
                  id="myTab"
                  role="tablist"
                >
                  <li class="nav-item">
                    <a
                      class="flex-sm-fill text-sm-center nav-link active"
                      id="tiancizhuang-tab"
                      data-toggle="tab"
                      href="#nav-tiancizhuang"
                      role="tab"
                      aria-controls="nav-tiancizhuang"
                      aria-selected="true"
                      >天赐庄</a
                    >
                  </li>
                  <li class="nav-item">
                    <a
                      class="nav-item nav-link"
                      id="nav-dushuhu-tab"
                      data-toggle="tab"
                      href="#nav-dushuhu"
                      role="tab"
                      aria-controls="nav-dushuhu"
                      aria-selected="false"
                      >独墅湖</a
                    >
                  </li>
                  <li class="nav-item">
                    <a
                      class="nav-item nav-link"
                      id="nav-yangchenghu-tab"
                      data-toggle="tab"
                      href="#nav-yangchenghu"
                      role="tab"
                      aria-controls="nav-yangchenghu"
                      aria-selected="false"
                      >阳澄湖</a
                    >
                  </li>
                </ul>
              </div>
              <div class="card-body tab-content" id="myTabContent">
                <div
                  class="tab-pane fade show active"
                  id="nav-tiancizhuang"
                  role="tabpanel"
                  aria-labelledby="nav-tiancizhuang-tab"
                >
                  <div class="row">
                    <table class="table table-hover">
                      <thead>
                        <tr>
                          <th scope="col">部门</th>
                          <th scope="col">一面准备室</th>
                          <th scope="col">一面教室</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr>
                          <td>办公室</td>
                          <td><a href="javascript:setpoint('东教楼')">东教楼104</a></td>
                          <td><a href="javascript:setpoint('东教楼')">东教楼101</a></td>
                        </tr>
                        <tr>
                          <td>项管部</td>
                          <td><a href="javascript:setpoint('东教楼')">东教楼107</a></td>
                          <td><a href="javascript:setpoint('东教楼')">东教楼103</a></td>
                        </tr>
                        <tr>
                          <td>创服部</td>
                          <td><a href="javascript:setpoint('文思楼')">文思楼208</a></td>
                          <td><a href="javascript:setpoint('文思楼')">文思楼201</a></td>
                        </tr>
                        <tr>
                          <td>实践部</td>
                          <td><a href="javascript:setpoint('东教楼')">东教楼105</a></td>
                          <td><a href="javascript:setpoint('东教楼')">东教楼102</a></td>
                        </tr>
                        <tr>
                          <td>活动部</td>
                          <td><a href="javascript:setpoint('文思楼')">文思楼207</a></td>
                          <td><a href="javascript:setpoint('文思楼')">文思楼202</a></td>
                        </tr>
                        <tr>
                          <td>图文中心</td>
                          <td><a href="javascript:setpoint('文思楼')">文思楼207</a></td>
                          <td><a href="javascript:setpoint('文思楼')">文思楼206</a></td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                </div>
                <div
                  class="tab-pane fade"
                  id="nav-dushuhu"
                  role="tabpanel"
                  aria-labelledby="nav-dushuhu-tab"
                >
                <div class="row">
                  <table class="table table-hover">
                    <thead>
                      <tr>
                        <th scope="col">部门</th>
                        <th scope="col">一面准备室</th>
                        <th scope="col">一面教室</th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr>
                        <td>办公室</td>
                        <td><a href="javascript:setpoint('独墅湖1001')">1001-1203</a></td>
                        <td><a href="javascript:setpoint('独墅湖1002')">1002-2206</a></td>
                    </tr>
                    <tr>
                        <td>项管部</td>
                        <td><a href="javascript:setpoint('独墅湖1002')">1002-2105</a></td>
                        <td><a href="javascript:setpoint('独墅湖1002')">1002-2106</a></td>
                    </tr>
                    <tr>
                        <td>创服部</td>
                        <td><a href="javascript:setpoint('独墅湖1002')">1002-2201</a></td>
                        <td><a href="javascript:setpoint('独墅湖1002')">1002-2202</a></td>
                    </tr>
                    <tr>
                        <td>实践部</td>
                        <td><a href="javascript:setpoint('独墅湖1002')">1002-2203</a></td>
                        <td><a href="javascript:setpoint('独墅湖1002')">1002-2204</a></td>
                    </tr>
                    <tr>
                        <td>活动部</td>
                        <td><a href="javascript:setpoint('独墅湖1001')">1001-1403</a></td>
                        <td><a href="javascript:setpoint('独墅湖1002')">1002-2401</a></td>
                    </tr>
                    <tr>
                        <td>图文中心</td>
                        <td><a href="javascript:setpoint('独墅湖1002')">1002-2402</a></td>
                        <td><a href="javascript:setpoint('独墅湖1002')">1002-2403</a></td>
                    </tr>
                    </tbody>
                  </table>
                </div>
                </div>
                <div
                  class="tab-pane fade"
                  id="nav-yangchenghu"
                  role="tabpanel"
                  aria-labelledby="nav-yangchegnhu-tab"
                >
                  <div class="row">
                    <table class="table table-hover">
                      <thead>
                        <tr>
                          <th scope="col">部门</th>
                          <th scope="col">一面准备室</th>
                          <th scope="col">一面教室</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr>
                          <td>实践部</a></td>
                          <td><a href="javascript:setpoint('阳澄湖第一教学楼')">1C107</a></td>
                          <td><a href="javascript:setpoint('阳澄湖第一教学楼')">1C109</a></td>
                        </tr>
                        <tr>
                          <td>项管部</td>
                          <td><a href="javascript:setpoint('阳澄湖第一教学楼')">1C110</a></td>
                          <td><a href="javascript:setpoint('阳澄湖第一教学楼')">1C111</a></td>
                        </tr>
                        <tr>
                          <td>图文中心</td>
                          <td><a href="javascript:setpoint('阳澄湖第一教学楼')">1C110</a></td>
                          <td><a href="javascript:setpoint('阳澄湖第一教学楼')">1C111</a></td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                </div>
                <div class="alert alert-success" role="alert">
                  数据最后更新于2020/9/19 14:00
                </div>
              </div>
            </div>
          </div>
          <div class="col-sm-7">
            <div class="card" style="width: 100%">
              <div class="card-img-top" id="bdmap"></div>
              <div class="card-body">
                <p class="card-text">点击教室号查看位置，图上标注的就是对应的大楼</p>
              </div>
            </div>
          </div>
        </div>
      </main>
      <!-- Modal -->
      <div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered" role="document">
          <div class="modal-content">
            <div class="modal-header">
              <h5 class="modal-title" id="exampleModalCenterTitle">关注苏大科协公众号，获取招新面试信息</h5>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">
              <img src="assets/images/qr.png" class="img-fluid"  alt="qr.png">
            </div>
            <div class="modal-footer">

              <button type="button" class="btn btn-primary" data-dismiss="modal">好的</button>
            </div>
          </div>
        </div>
      </div>
      <footer class="mastfoot mt-auto">
        <div class="inner">
          <p>©2020 苏州大学学生科技协会. Powered By Gitee. </p>
        </div>
      </footer>
    </div>
    <script
      type="text/javascript"
      src="https://api.map.baidu.com/api?v=3.0&ak=BE6GpKGpXPhNRFdow3R8P6xtlnMHytTu"
    ></script>
    <script type="text/javascript">
      var map = new BMap.Map("bdmap"); //创建地图
      var top_left_navigation = new BMap.NavigationControl();  //左上角，添加默认缩放平移控件
      map.addControl(top_left_navigation);   
      var point = new BMap.Point(120.658495,31.307771); //创建地图坐标点,一般首次创建的这个点为地图的中心坐标点
      map.centerAndZoom(point, 20); //初始化地图，设置中心坐标点和地图级数
      var marker = new BMap.Marker(point); //创建标注
      map.addOverlay(marker); //方法addOverlay() 向地图中添加覆盖物
      var label = new BMap.Label("请从北门进入", {
        offset: new BMap.Size(20, -10),
      });
      marker.setLabel(label);

      //设置点
      function setpoint(building) {
        var loc = {
          东教楼: {
            location: [120.658495,31.307771],
            label: "请从楼北门进入",
          },
          文思楼: {
            location: [120.656994,31.307546],
            label: "请从楼北门进入",
          },
          阳澄湖第一教学楼: {
            location: [120.684947,31.392351],
            label: "请从正门进入",
          },
          独墅湖1001:{
            location:[120.734649,31.273232],
            label:"请从正门进入"
          },
          独墅湖1002:{
            location:[120.734491,31.273429],
            label:"请从正门进入"
          },
        };

        map.panTo(
          new BMap.Point(loc[building].location[0], loc[building].location[1])
        ); //两秒后移动到广州
        var marker = new BMap.Marker(new BMap.Point(loc[building].location[0], loc[building].location[1])); //创建标注    
        
        var label = new BMap.Label(loc[building].label, {
          offset: new BMap.Size(20, -10),
        });
        map.clearOverlays();
        map.addOverlay(marker); //方法addOverlay() 向地图中添加覆盖物
        marker.setLabel(label);
      }
    </script>
  </body>
</html>
